#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
inline void keep_window_open() {char ch; cin >> ch; }

int main(){
vector<int> v;
while (1) {
int i;
cin >> i;
if (0==i) break;
v.push_back(i);
}

for ( int m=0; m < v.size(); ++m) {
   for ( int k=0; k < v.size(); ++k) {
     int kol=0;
     if (k!=m) { if (v[k]==v[m]){
       kol+=1;
     }}
   }
   cout << "kolichestvo " << v[m] << " =" << kol << '\n';  
}  
}
